package com.htfyun.eink.pw.draw.pen;

import android.graphics.Rect;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.htfyun.eink.pw.draw.IPWDraw;
import com.htfyun.eink.pw.draw.IPWDrawPath;
import com.htfyun.eink.pw.draw.IPWDrawProperty;
import com.htfyun.eink.pw.draw.cache.IPathCache;
import com.htfyun.eink.pw.draw.pointer.PWPointer;

public interface IPen {
    String TAG = IPWDraw.TAG;

    /**
     * @param draw    {@link IPWDrawProperty}
     * @param pointer {@link PWPointer}, 这个 pointer 在此方法返回后, 会被立即回收.
     * @return {@link PenDrawPointerResultEnums}
     */
    @NonNull
    PenDrawPointerResultEnums drawPointer(@NonNull IPWDrawPath draw, @NonNull PWPointer pointer);

    @NonNull
    Rect getDirty();

    /**
     * @return 返回 pen id. 用 String 表示, 这样对于自定义 pen 会好点.
     */
    @NonNull
    String getPenId();

    /**
     *
     * @return IPathCache 的实例
     */
    @Nullable
    IPathCache getPathCache();

}
